package src;

/**
 * Created by dell on 2017/8/3.
 */
 class StudentTest {
    public void sex(){
        System.out.println("男");
    }
    public void sex(String sex){
        if (sex=="男"){
            System.out.println("sex is male");
        }
        else if (sex=="女"){
            System.out.println("sex is female");
        }
        else {
            System.out.println("inputting is wrong!");
        }
    }
}
public class StudentSexTest{
    public static void main(String[] args) {
        StudentTest st=new StudentTest();
        st.sex();
        st.sex("女");
        st.sex("456");
    }
}
